const data_config = require("./data_config");


module.exports = {
  nav_name: '代理管理', //生成导航菜单
  module_name: 'agent_m',  //生成路径，必须与文件名相同
  api: `{
    agent_page: commonPath + "/admin/user_agency/page", //代理列表（确认状态），审核列表（待审核）
    agent_detail: commonPath + '/admin/user_agency/get', //代理详情,    
    lit_city_page: commonPath + '/admin/agency_city/page', //点亮城市返回    
    changeState: commonPath + '/admin/user_agency/audit', //代理审核  
    set_agent_recom: commonPath + '/admin/user_agency/setRecommendUser', //设置代理推荐用户
    cancel_agent: cPath + "/admin/user_agency/cancelAgency", //取消代理
  
  }`, //接口

  //代理列表
  table1: {
    // 确认时间处理
    isGenerate: "false", //false表示不生成页面
    table_name: "agent_table",  //表页面名
    nav_name: "代理列表",  //导航名
    tipsText: "代理管理 >> 代理列表", //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    pageApi: "API.agent_m.agent_page",  //请求api
    extraPageRequestParams: `
      state: 6,  //确认状态
    `, //已有page和pageSize
    //获取列表页面
    tableData: [
      //普通
      { title: '序号', name: 'index', type: "normal" },
      { title: '用户昵称', name: 'name', type: "normal" },
      { title: '手机号', name: 'tel', type: "normal" },
      {
        title: '代理级别',
        name: 'type',
        type: "opts",
        showName: "typeShow",
        showObj: `{
          "1": "尚链分院（省级代理）",
          "2": "运营中心（市级代理）",
          "3": "城市合伙人（县级代理）",
        }`
      },
      //代理城市编号，目前返回的是编号，后面要改为城市
      // { title: '代理城市编号', name: 'agencyAddes', type: "normal" },
      { title: '代理地区', name: 'anencyName', type: "normal" },
      //推荐人，目前是id
      { title: '推荐人id', name: 'recommendUser', type: "normal" },
      { title: '推荐人手机号', name: 'recommendTel', type: "normal" },
      //确认支付时间，=> 确认状态
      { title: '最后确认时间', name: 'confirmState', type: "normal" },
    ],
    tableOpt: [
      {
        type: "view",
        text: "查看",
        request: false,
        jump: "/agent_m_agent_detail"
      },
      {
        type: "changeState",
        text: "取消代理",
        request: true,
        url: "API.agent_m.cancel_agent",
        requestType: 'get',
        params: `{id }`, //必须为文本
        methodNameTag: 'Close', //方法衔接拓展名 changeState Black
        showCondition: ``,  //展示条件，没有就不传或置为空
      },
    ],
    search: {
      contentArr: {
        input1: { labelName: '电话', inputName: 'tel' },
        select1: {
          labelName: '状态',
          inputName: 'state',  //输入绑定的变量
          selectOptsName: "stateOpts",
          selectOptsArr: `[
            { value: "1", label: "点亮" },
            { value: "2", label: "已竞购并支付（认购）" },
            { value: "3", label: "待确认支付" },
            { value: "4", label: "已确认支付" },
            { value: "5", label: "退款" },
            { value: "6", label: "确认(代理)" },
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },

        select2: {
          labelName: '类型',
          inputName: 'type',  //输入绑定的变量
          selectOptsName: "typeOpts",
          selectOptsArr: `[
            { value: "1", label: "尚链分院（省级代理）" },
            { value: "2", label: "运营中心（市级代理）" },
            { value: "3", label: "城市合伙人（县级代理）" },
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
      },
      //查找按钮的文字
      searchBtn: {
        text: "查询", //链接与table请求接口相同，不做另外配置
      },
      //添加按钮
      // addBtn: {
      //   //搜索栏具有添加功能按钮时，设置此字段
      //   type: "add",
      //   text: "新增等级",
      //   request: false,
      //   jump: "/agent_m_agent_detail", //添加的跳转按钮
      // }
    },
  },


  //详情页面
  detail_page1: {
    // isGenerate: "false", //false表示不生成页面
    detail_page_name: "agent_detail",
    detail_api: "API.agent_m.agent_detail",
    request_params: `{
        id,
      }`,
    tipsText: "代理管理 >> 代理详情",
    formData: {
      // titleText: "请填写管理员相关信息",
      item1: {
        labelName: "用户名称",
        inputName: 'name',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_2: {
        labelName: "代理名称",
        inputName: 'anencyName',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_3: {
        labelName: "代理城市编号",
        inputName: 'agencyAddes',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_4: {
        labelName: "认购额度",
        inputName: 'amountNumber',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_5: {
        labelName: "确认支付时间",
        inputName: 'confirmState',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_6: {
        labelName: "创建时间",
        inputName: 'createDate',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_7: {
        labelName: "推荐用户手机号",
        inputName: 'recommendTel',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_8: {
        labelName: "推荐用户",
        inputName: 'recommendUser',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      //选项展示
      item1_9: {
        labelName: '打款状态',
        inputName: 'state',
        type: "opts",
        optShowName: "stateShow",
        optShowStr: `{
          "1": "点亮",
          "2": "已竞购并支付（认购）",
          "3": "待确认支付",
          "4": "已确认支付",
          "5": "退款",
          "6": "确认(代理) ",
        }`,
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_10: {
        labelName: "手机号",
        inputName: 'tel',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_11: {
        labelName: "确认额度",
        inputName: 'totalAmount',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },

      //选项展示
      item1_12: {
        labelName: '类型',
        inputName: 'type',
        type: "opts",
        optShowName: "typeShow",
        optShowStr: `{
            "1": "尚链分院（省级代理）",
            "2": "运营中心（市级代理）",
            "3": "城市合伙人（县级代理）",
          }`,
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_13: {
        labelName: "认购时间",
        inputName: 'updateDate',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_14: {
        labelName: "用户id",
        inputName: 'userId',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },

    },
  },

  //代理审核列表
  table2: {
    isGenerate: "false", //false表示不生成页面
    table_name: "agent_verify_table",  //表页面名
    nav_name: "代理招商审核",  //导航名
    tipsText: "代理管理 >> 代理招商审核", //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    pageApi: "API.agent_m.agent_page",  //请求api
    // extraPageRequestParams: `
    //   state: 6,  //确认状态
    // `, //已有page和pageSize
    //获取列表页面
    tableData: [
      //普通
      { title: '序号', name: 'index', type: "normal" },
      { title: '用户昵称', name: 'name', type: "normal" },
      { title: '手机号', name: 'tel', type: "normal" },
      {
        title: '代理级别',
        name: 'type',
        type: "opts",
        showName: "typeShow",
        showObj: `{
          "1": "尚链分院（省级代理）",
          "2": "运营中心（市级代理）",
          "3": "城市合伙人（县级代理）",
        }`
      },
      { title: '代理城市编号', name: 'agencyAddes', type: "normal" },
      { title: '申请地区', name: 'temp', type: "normal" },
      // { title: '认购额度', name: 'amountNumber', type: "normal" },
      // { title: '确认额度', name: 'totalAmount', type: "normal" },
      // { title: '认购时间', name: 'updateDate', type: "normal" },
      { title: '推荐人', name: 'recommendUser', type: "normal" },
      { title: '申请时间', name: 'createDate', type: "normal" },
    ],
    tableOpt: [
      {
        type: "view",
        text: "设置推荐人",
        request: false,
        jump: "/agent_m_agent_verify_detail",
      },
      {
        type: "view",
        text: "查看",
        request: false,
        jump: "/agent_m_agent_verify_detail",
      },
      {
        type: "changeState",
        text: "通过",
        request: true,
        url: "API.agent_m.changeState",
        requestType: 'post',
        params: `{id,  state: 6 }`, //必须为文本 状态 1上架 2下架
        methodNameTag: 'Open', //方法衔接拓展名 changeState Black
        showCondition: `scope.row.state != '5' && scope.row.state != '6'`,  //展示条件，没有就不传或置为空
      },
      {
        type: "changeState",
        text: "拒绝",
        request: true,
        url: "API.agent_m.changeState",
        requestType: 'post',
        params: `{id,  state: 5 }`, //必须为文本
        methodNameTag: 'Close', //方法衔接拓展名 changeState Black
        showCondition: `scope.row.state != '5' && scope.row.state != '6'`,  //展示条件，没有就不传或置为空
      },
      //调整排序

    ],
    search: {
      contentArr: {
        input1: { labelName: '电话', inputName: 'tel' },
        select1: {
          labelName: '状态',
          inputName: 'state',  //输入绑定的变量
          selectOptsName: "stateOpts",
          selectOptsArr: `[
            { value: "1", label: "点亮" },
            { value: "2", label: "已竞购并支付（认购）" },
            { value: "3", label: "待确认支付" },
            { value: "4", label: "已确认支付" },
            { value: "5", label: "退款" },
            { value: "6", label: "确认(代理)" },
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },

        select2: {
          labelName: '类型',
          inputName: 'type',  //输入绑定的变量
          selectOptsName: "typeOpts",
          selectOptsArr: `[
            { value: "1", label: "尚链分院（省级代理）" },
            { value: "2", label: "运营中心（市级代理）" },
            { value: "3", label: "城市合伙人（县级代理）" },
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
      },
      //查找按钮的文字
      searchBtn: {
        text: "查询", //链接与table请求接口相同，不做另外配置
      },
      //添加按钮
      // addBtn: {
      //   //搜索栏具有添加功能按钮时，设置此字段
      //   type: "add",
      //   text: "新增等级",
      //   request: false,
      //   jump: "/member_manager_add_page", //添加的跳转按钮
      // }
    },
  },

  
  //设置代理推荐人
  table2_1: {
    isGenerate: "false", //false表示不生成页面
    table_name: "set_agent_rec_t",  //表页面名
    // nav_name: "设置代理推荐人",  //导航名
    tipsText: "代理管理 >> 设置代理推荐人", //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    // pageApi: "API.agent_m.agent_page",  //请求api
    // extraPageRequestParams: `
    //   state: 6,  //确认状态
    // `, //已有page和pageSize
    //获取列表页面
    tableData: [
      // //普通
      // { title: '序号', name: 'index', type: "normal" },
      // { title: '用户昵称', name: 'name', type: "normal" },
      // { title: '手机号', name: 'tel', type: "normal" },
      // {
      //   title: '代理级别',
      //   name: 'type',
      //   type: "opts",
      //   showName: "typeShow",
      //   showObj: `{
      //     "1": "尚链分院（省级代理）",
      //     "2": "运营中心（市级代理）",
      //     "3": "城市合伙人（县级代理）",
      //   }`
      // },
      // { title: '代理城市编号', name: 'agencyAddes', type: "normal" },
      // { title: '申请地区', name: 'temp', type: "normal" },
      // // { title: '认购额度', name: 'amountNumber', type: "normal" },
      // // { title: '确认额度', name: 'totalAmount', type: "normal" },
      // // { title: '认购时间', name: 'updateDate', type: "normal" },
      // { title: '推荐人', name: 'recommendUser', type: "normal" },
      // { title: '申请时间', name: 'createDate', type: "normal" },
    ],
    tableOpt: [
      // {
      //   type: "view",
      //   text: "设置推荐人",
      //   request: false,
      //   jump: "/agent_m_agent_verify_detail",
      // },
      // {
      //   type: "view",
      //   text: "查看",
      //   request: false,
      //   jump: "/agent_m_agent_verify_detail",
      // },
      // {
      //   type: "changeState",
      //   text: "通过",
      //   request: true,
      //   url: "API.agent_m.changeState",
      //   requestType: 'post',
      //   params: `{id,  state: 6 }`, //必须为文本 状态 1上架 2下架
      //   methodNameTag: 'Open', //方法衔接拓展名 changeState Black
      //   showCondition: `scope.row.state != '5' && scope.row.state != '6'`,  //展示条件，没有就不传或置为空
      // },
      // {
      //   type: "changeState",
      //   text: "拒绝",
      //   request: true,
      //   url: "API.agent_m.changeState",
      //   requestType: 'post',
      //   params: `{id,  state: 5 }`, //必须为文本
      //   methodNameTag: 'Close', //方法衔接拓展名 changeState Black
      //   showCondition: `scope.row.state != '5' && scope.row.state != '6'`,  //展示条件，没有就不传或置为空
      // },
      // //调整排序

    ],
    search: {
      contentArr: {
        // input1: { labelName: '电话', inputName: 'tel' },
        // select1: {
        //   labelName: '状态',
        //   inputName: 'state',  //输入绑定的变量
        //   selectOptsName: "stateOpts",
        //   selectOptsArr: `[
        //     { value: "1", label: "点亮" },
        //     { value: "2", label: "已竞购并支付（认购）" },
        //     { value: "3", label: "待确认支付" },
        //     { value: "4", label: "已确认支付" },
        //     { value: "5", label: "退款" },
        //     { value: "6", label: "确认(代理)" },
        //     { value: "", label: "请选择" },
        //   ],
        //   `, //选项数组
        // },

        // select2: {
        //   labelName: '类型',
        //   inputName: 'type',  //输入绑定的变量
        //   selectOptsName: "typeOpts",
        //   selectOptsArr: `[
        //     { value: "1", label: "尚链分院（省级代理）" },
        //     { value: "2", label: "运营中心（市级代理）" },
        //     { value: "3", label: "城市合伙人（县级代理）" },
        //     { value: "", label: "请选择" },
        //   ],
        //   `, //选项数组
        // },
      },
      //查找按钮的文字
      // searchBtn: {
      //   text: "查询", //链接与table请求接口相同，不做另外配置
      // },
      //添加按钮
      // addBtn: {
      //   //搜索栏具有添加功能按钮时，设置此字段
      //   type: "add",
      //   text: "新增等级",
      //   request: false,
      //   jump: "/member_manager_add_page", //添加的跳转按钮
      // }
    },
  },


  //详情页面
  detail_page2: {
    // isGenerate: "false", //false表示不生成页面
    detail_page_name: "agent_verify_detail",
    detail_api: "API.agent_m.agent_detail",
    request_params: `{
        id,
      }`,
    tipsText: "代理管理 >> 代理审核详情",
    formData: {
      // titleText: "请填写管理员相关信息",
      item1: {
        labelName: "用户名称",
        inputName: 'name',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_2: {
        labelName: "代理名称",
        inputName: 'anencyName',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_3: {
        labelName: "代理城市编号",
        inputName: 'agencyAddes',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_4: {
        labelName: "认购额度",
        inputName: 'amountNumber',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_5: {
        labelName: "确认支付时间",
        inputName: 'confirmState',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_6: {
        labelName: "创建时间",
        inputName: 'createDate',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_7: {
        labelName: "推荐用户手机号",
        inputName: 'recommendTel',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_8: {
        labelName: "推荐用户",
        inputName: 'recommendUser',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      //选项展示
      item1_9: {
        labelName: '打款状态',
        inputName: 'state',
        type: "opts",
        optShowName: "stateShow",
        optShowStr: `{
          "1": "点亮",
          "2": "已竞购并支付（认购）",
          "3": "待确认支付",
          "4": "已确认支付",
          "5": "退款",
          "6": "确认(代理) ",
        }`,
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_10: {
        labelName: "手机号",
        inputName: 'tel',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_11: {
        labelName: "确认额度",
        inputName: 'totalAmount',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },

      //选项展示
      item1_12: {
        labelName: '类型',
        inputName: 'type',
        type: "opts",
        optShowName: "typeShow",
        optShowStr: `{
            "1": "尚链分院（省级代理）",
            "2": "运营中心（市级代理）",
            "3": "城市合伙人（县级代理）",
          }`,
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_13: {
        labelName: "认购时间",
        inputName: 'updateDate',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_14: {
        labelName: "用户id",
        inputName: 'userId',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },

    },
  },




  //城市点亮列表
  table3: {
    // isGenerate: "false", //false表示不生成页面
    table_name: "lit_city_table",  //表页面名
    nav_name: "城市点亮列表",  //导航名
    tipsText: "代理管理 >> 城市点亮列表", //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    pageApi: "API.agent_m.lit_city_page",  //请求api
    // extraPageRequestParams: `
    //   courseId: this.$route.query.id,  //请求
    // `, //已有page和pageSize

    //获取列表页面
    tableData: [
      //普通
      { title: '序号', name: 'index', type: "normal" },
      { title: '城市编号', name: 'cityId', type: "normal" },
      { title: '城市名称', name: 'cityName', type: "normal" },
      {
        title: '城市等级',
        name: 'cityType',
        type: "opts",
        showName: "cityTypeShow",
        showObj: `{
          "1": "省级",
          "2": "市级",
          "3": "县级",
        }`
      },

      { title: '点亮人数', name: 'minNumber', type: "normal" },
      { title: '当前已实名人数', name: 'approveNum', type: "normal" },
      { title: '竞购人数', name: 'makeNumber', type: "normal" },
      { title: '激活人数', name: 'maxNumber', type: "normal" },
      { title: '确认金额', name: 'totalAmount', type: "normal" },
      {
        title: '状态',
        name: 'state',
        type: "opts",
        showName: "stateShow",
        showObj: `{
          "0": "未点亮",
          "1": "已点亮",
          "2": "已激活",
          "3": "认购中",
          "4": "竞枪中",
          "5": "已确认",
        }`
      },
    ],
    tableOpt: [

    ],
    search: {
      contentArr: {
        input1: { labelName: '地区名称', inputName: 'cityName' },
        select1: {
          labelName: '是否已激活',
          inputName: 'state',  //输入绑定的变量
          selectOptsName: "stateOpts",
          selectOptsArr: `[
            { value: "0", label: "未点亮" },
            { value: "1", label: "已点亮" },
            { value: "2", label: "已激活" },
            { value: "3", label: "认购中" },
            { value: "4", label: "竞枪中" },
            { value: "5", label: "已确认" },
            { value: "", label: "请选择" },
          ],
          `, //选项数组
        },
      },
      //查找按钮的文字
      searchBtn: {
        text: "查询", //链接与table请求接口相同，不做另外配置
      },
      //添加按钮
      // addBtn: {
      //   //搜索栏具有添加功能按钮时，设置此字段
      //   type: "add",
      //   text: "新增等级",
      //   request: false,
      //   jump: "/member_manager_add_page", //添加的跳转按钮
      // }
    },
  },



}

